/*
Copyright (C) 1996-1997 Id Software, Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
// screen.h

#pragma once

typedef struct scrdef_s
{
	BOOL Initialized;
	BOOL DisabledForLoading;
	float DisabledTime;
	BOOL DrawDialog;
	BOOL DrawLoading;
	BOOL DrawMapshot;

	float ConCurrent;
	float ConLines;

	char *NotifyString;

	// center printing
	char CenterString[1024];
	float CentertimeStart;	// for slow victory printing
	float CentertimeOff;
	int CenterLines;
	int EraseLines;
	int EraseCenter;
} scrdef_t;

extern scrdef_t scr;

void SCR_Init (void);
void SCR_InitPics (void);
void SCR_MapShot (char *name);

void SCR_UpdateScreen (double frametime);

void SCR_SizeUp (void);
void SCR_SizeDown (void);
void SCR_CenterPrint (char *str);

void SCR_BeginLoadingPlaque (void);
void SCR_EndLoadingPlaque (void);

int SCR_ModalMessage (char *text);

extern cvar_t *scr_viewsize;
extern cvar_t *scr_fov;
extern cvar_t *scr_conspeed;
extern cvar_t *scr_centertime;
extern cvar_t *scr_showram;
extern cvar_t *scr_showturtle;
extern cvar_t *scr_showpause;
extern cvar_t *scr_printspeed;
extern cvar_t *scr_showfps;

void SCR_UpdateWholeScreen (void);
void SCR_DisableForLoading (BOOL disable);

float SCR_CalcFovX (float fov_y, float width, float height);
float SCR_CalcFovY (float fov_x, float width, float height);
